package com.bestow.basic.service.impl;

import java.util.List;
import com.bestow.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.bestow.basic.mapper.FndBaseRateSetMapper;
import com.bestow.basic.domain.FndBaseRateSet;
import com.bestow.basic.service.IFndBaseRateSetService;

/**
 * 基准利率定义Service业务层处理
 * 
 * @author liliu
 * @date 2022-09-02
 */
@Service
public class FndBaseRateSetServiceImpl implements IFndBaseRateSetService 
{
    @Autowired
    private FndBaseRateSetMapper fndBaseRateSetMapper;

    /**
     * 查询基准利率定义
     * 
     * @param baseRateSet 基准利率定义主键
     * @return 基准利率定义
     */
    @Override
    public FndBaseRateSet selectFndBaseRateSetByBaseRateSet(String baseRateSet)
    {
        return fndBaseRateSetMapper.selectFndBaseRateSetByBaseRateSet(baseRateSet);
    }

    /**
     * 查询基准利率定义列表
     * 
     * @param fndBaseRateSet 基准利率定义
     * @return 基准利率定义
     */
    @Override
    public List<FndBaseRateSet> selectFndBaseRateSetList(FndBaseRateSet fndBaseRateSet)
    {
        return fndBaseRateSetMapper.selectFndBaseRateSetList(fndBaseRateSet);
    }

    /**
     * 新增基准利率定义
     * 
     * @param fndBaseRateSet 基准利率定义
     * @return 结果
     */
    @Override
    public int insertFndBaseRateSet(FndBaseRateSet fndBaseRateSet)
    {
        fndBaseRateSet.setCreateTime(DateUtils.getNowDate());
        return fndBaseRateSetMapper.insertFndBaseRateSet(fndBaseRateSet);
    }

    /**
     * 修改基准利率定义
     * 
     * @param fndBaseRateSet 基准利率定义
     * @return 结果
     */
    @Override
    public int updateFndBaseRateSet(FndBaseRateSet fndBaseRateSet)
    {
        fndBaseRateSet.setUpdateTime(DateUtils.getNowDate());
        return fndBaseRateSetMapper.updateFndBaseRateSet(fndBaseRateSet);
    }

    /**
     * 批量删除基准利率定义
     * 
     * @param baseRateSets 需要删除的基准利率定义主键
     * @return 结果
     */
    @Override
    public int deleteFndBaseRateSetByBaseRateSets(String[] baseRateSets)
    {
        return fndBaseRateSetMapper.deleteFndBaseRateSetByBaseRateSets(baseRateSets);
    }

    /**
     * 删除基准利率定义信息
     * 
     * @param baseRateSet 基准利率定义主键
     * @return 结果
     */
    @Override
    public int deleteFndBaseRateSetByBaseRateSet(String baseRateSet)
    {
        return fndBaseRateSetMapper.deleteFndBaseRateSetByBaseRateSet(baseRateSet);
    }
}
